package com.zt.ztzx.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zt.ztzx.model.entity.device.DeviceGather;
import com.zt.ztzx.model.vo.DeviceVo;
import com.zt.ztzx.model.vo.common.Result;
import com.zt.ztzx.service.DeviceGatherService;
import com.zt.ztzx.mapper.DeviceGatherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 16236
* @description 针对表【t_device_gather】的数据库操作Service实现
* @createDate 2024-09-11 09:22:32
*/
@Service
public class DeviceGatherServiceImpl extends ServiceImpl<DeviceGatherMapper, DeviceGather>
    implements DeviceGatherService{

    @Autowired
    private DeviceGatherMapper deviceGatherMapper;

    @Override
    public Result<PageInfo<DeviceVo>> getDeviceList(Integer tid, Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<DeviceVo> deviceList = deviceGatherMapper.selectAll(tid);
        PageInfo<DeviceVo> pageInfo = new PageInfo<>(deviceList);
        return Result.build(pageInfo,200,"查询成功");
    }
}




